/**
 * Created by chesw on 2017/5/15.
 * describe：个人资料设置
 */
var personalInfo = Vue.extend({
    props: [],
    data: function () {
        return {
            tabValid: 'sp-valid-tab',
            tabInvalid: 'sp-invalid-tab',
            tab: true, //true：显示第一个tab
        }
    },
    methods: {
        save: function () {
            console.log("djakljd");
            this.$emit('showmd', Personal.MYDIAGNOSIS);
        },
        savePwd: function () {

        },
        cancel: function () {
            this.$emit('showmd', Personal.MYDIAGNOSIS);
        }
    },
    template: '<div class="set-personal-data">' +
        '<div class="set-tab">' +
            '<p :class="[tab ? tabValid : tabInvalid]" @click="tab=true">基本信息设置</p>' +
            '<p :class="[tab ? tabInvalid : tabValid]" @click="tab=false">修改密码</p>' +
        '</div>' +
        '<div class="set-content" v-if="tab">' +
            '<div class="diagnosis-style flex">' +
                '<span class="label-cls">手机号</span>' +
                '<span class="set-pd-phone">15821854154</span>' +
            '</div>' +
            '<div class="diagnosis-style flex">' +
                '<span class="label-cls">真实姓名</span>' +
                '<span class="input-cls normal-input-cls">' +
                    '<input class="normal-input" type="text" placeholder="名字">' +
                    '<i class="x-icon"></i>' +
                '</span>' +
                '<span class="required">*</span>' +
            '</div>' +
            '<div class="diagnosis-style flex">' +
                '<span class="label-cls">性别</span>' +
                '<div class="set-pd-sex">' +
                    '<label class="sex"><input type="radio" checked="checked" name="Sex"> 男</label>' +
                    '<label class="sex"><input type="radio" name="Sex"> 女</label>' +
                    '<label class="sex"><input type="radio" name="Sex"> 保密</label>' +
                    '<span class="required">*</span>' +
                '</div>' +
            '</div>' +
            '<div class="diagnosis-style flex">' +
                '<span class="label-cls">头像</span>' +
                '<div class="set-pd-head">' +
                    '<input id="upload-img" type=file>' +
                    '<span class="up-head-btn">上传图片</span>' +
                    '<span class="notice">仅支持JPG，GIF，PNG格式图片，且文件小于2M。</span>' +
                '</div>' +
            '</div>' +
            '<div class="pd-head-img">' +
                '<div class="head-img">' +
                    '<img src="../image/doctor.png">' +
                '</div>' +
            '</div>' +
            '<div class="diagnosis-style flex">' +
                '<span class="label-cls">证件号</span>' +
                '<span class="input-cls normal-input-cls">' +
                    '<input class="normal-input" type="text" placeholder="证件号">' +
                    '<i class="x-icon"></i>' +
                '</span>' +
                '<span class="required">*</span>' +
            '</div>' +
            '<div class="bottom-btn">' +
                '<span class="checkbox"><input type="checkbox">&nbsp;&nbsp;设置默认就诊人</span>' +
                '<span class="btn save" @click="save">保存</span>' +
                '<span class="btn cancel" @click="cancel">取消</span>' +
            '</div>' +
        '</div>' +
        '<div class="modify-password" v-else>' +
            '<div class="diagnosis-style flex">' +
                '<span class="label-cls">原密码</span>' +
                '<span class="input-cls normal-input-cls">' +
                    '<input class="normal-input" type="text" placeholder="原密码">' +
                    '<i class="x-icon"></i>' +
                '</span>' +
                '<span class="required spd-required">* 原密码不能为空</span>' +
            '</div>' +
            '<div class="diagnosis-style flex">' +
                '<span class="label-cls">新密码</span>' +
                '<span class="input-cls normal-input-cls">' +
                    '<input class="normal-input" type="text" placeholder="新密码">' +
                    '<i class="x-icon"></i>' +
                '</span>' +
                '<span class="required spd-required">* 请输入6-20位新密码</span>' +
            '</div>' +
            '<div class="diagnosis-style flex">' +
                '<span class="label-cls">确认新密码</span>' +
                '<span class="input-cls normal-input-cls">' +
                    '<input class="normal-input" type="text" placeholder="新密码">' +
                    '<i class="x-icon"></i>' +
                '</span>' +
                '<span class="required spd-required">* 必须和新密码一致</span>' +
            '</div>' +
            '<div class="set-pd-btn flex">' +
                '<span class="btn save" @click="savePwd">保存</span>' +
                '<span class="btn cancel" @click="save">取消</span>' +
            '</div>' +
        '</div>' +
    '</div>'
});